

package com.hazelcast.internal.management.events;

import com.hazelcast.internal.json.JsonObject;

import java.util.Objects;
import java.util.UUID;

abstract class AbstractConfigUpdateEvent extends AbstractEventBase {
    private final UUID configUpdateProcessId;

    protected AbstractConfigUpdateEvent(UUID configUpdateProcessId) {
        this.configUpdateProcessId = Objects.requireNonNull(configUpdateProcessId, "configUpdateProcessId must not be null");
    }

    public UUID getConfigUpdateProcessId() {
        return configUpdateProcessId;
    }

    @Override
    public JsonObject toJson() {
        JsonObject json = new JsonObject();
        json.add("configUpdateProcessId", configUpdateProcessId.toString());
        return json;
    }
}
